#!/bin/sh

set -eu

CONFFILE="@MEMO_PREFIX@/etc/redis/sentinel.conf"

case "$1" in
	(remove)
	@MEMO_LAUNCHCTL_PREFIX@/bin/launchctl unload @MEMO_PREFIX@/Library/LaunchDaemons/io.redis.redis-sentinel.plist
	;;
    (purge)
    @MEMO_LAUNCHCTL_PREFIX@/bin/launchctl unload @MEMO_PREFIX@/Library/LaunchDaemons/io.redis.redis-sentinel.plist
    @MEMO_PREFIX@@MEMO_SUB_PREFIX@/bin/dpkg-statoverride --remove ${CONFFILE} || test $? -eq 2
    ;;
	(*)
	exit 0
	;;
esac

exit 0
